package com.thoughtworks.exception;

public class NoPathException extends Exception {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4643072394801449060L;
	private String message;
	
	public NoPathException() {
		super();
	}
	
	public NoPathException(String message) {
		super(message);
		this.message = message;
	}

	@Test
	public void testGetTripsWithMaxDistance() throws NoPathException {
		List<List<Edge>> trips = FindTripUtil.getTripsWithMaxDistance(allEdges, 25, "A", "C");
		assertEquals(8, trips.size());
	}
	
	@Test
	public void testGetTripsWithDistance() throws NoPathException {
		List<List<Edge>> trips = FindTripUtil.getTripsWithDistance(allEdges, 25, "A", "C");
		assertEquals(1, trips.size());
	}
	
	@Test
	public void testGetFixTrip() throws NoPathException {
		List<Edge> trip = FindTripUtil.getFixTrip(allEdges, "A-B-C-D");
		assertEquals(3, trip.size());
	}

}
